{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "94e29e63-0492-49b4-bc58-f9ae4dc4bf3e",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[torch.Size([2, 2, 128, 128, 64]), torch.Size([2, 2, 128, 128, 64]), torch.Size([2, 2, 128, 128, 64]), torch.Size([2, 2, 128, 128, 64]), torch.Size([2, 2, 128, 128, 64])]\n"
     ]
    }
   ],
   "source": [
    "import torch\n",
    "from model.H2ASeg import H2ASeg\n",
    "patch_size = (128, 128, 64)\n",
    "window_size = (8, 8, 4)\n",
    "batch_size = 2\n",
    "num_channels = [8, 16, 32, 64, 128]\n",
    "n_classes = 1\n",
    "in_channels = 1\n",
    "\n",
    "device = torch.device(\"cuda:0\")\n",
    "\n",
    "model = H2ASeg(\n",
    "            patch_size=patch_size,\n",
    "            in_channels=in_channels,\n",
    "            n_classes=n_classes+1,\n",
    "            num_channels=num_channels,\n",
    "            window_size=window_size,\n",
    "            ).to(device)\n",
    "ct = torch.randn((batch_size, 1, *patch_size)).to(device)\n",
    "pet = torch.randn((batch_size, 1, *patch_size)).to(device)\n",
    "\n",
    "outputs = model(ct, pet)\n",
    "print([output.shape for output in outputs])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "555cfbbe-600c-4e36-9d55-f4461382b488",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "nnunet",
   "language": "python",
   "name": "nnunet"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
